<template>
  <div>
    <input type="checkbox" checked="checked" @change="handleChange" />
    <label>记住我</label>
  </div>
</template>

<script>
export default {
  model: {
    name: 'checked',
    event: 'change'
  },
  props: ['checked'],
  methods: {
    handleChange(ev) {
      this.$emit('change', ev.target.checked)
    }
  }
}
</script>

<style lang="scss" scoped>
div {
  input {
    margin: 6px;
    border: solid 1px #ddd;
    padding: 6px 3px;
    outline: none;
  }
}
</style>